#ifndef _HF_H_
#define _HF_H_

#include "define.h"

#define		Hardware_Frequency_Shake_Mode	1

#define		Pwm_Freq_HF_power  			35000//25000      
#define		HF_PWM_MIN_FRE				1600	//minimum PWM convert	register  number   Fpwm=20K
#define		HF_PWM_MAX_FRE				640		//maximum PWM convert	register	number	 Fpwm=50K

#define		HF_Shake_FJPA_35K			10//	100
#define		HF_Shake_FJPB_35K			10//	100

#define		HF_Shake_FJPA_30K				50
#define		HF_Shake_FJPB_30K				50

#define		HF_Shake_FJPA_25K			50//	20
#define		HF_Shake_FJPB_25K			50//	20

#define		HF_Shake_FJPA_20K		20	//	10
#define		HF_Shake_FJPB_20K		20	//	10

#define     FJTMR_TIME1						(2400/16)		
#define     FJTMR_TIME2						(3200/16) 
#define     FJTMR_TIME3						(3200/16) 	
#define     FJTMR_TIME4						(320/16)	

#define 	HF_Shake_Frequency_Coarse_Control_Grade1		30000	
#define 	HF_Shake_Frequency_Coarse_Control_Grade2		25000
#define 	HF_Shake_Frequency_Fine_Control_Grade1			23000
#define 	HF_Shake_Frequency_Fine_Control_Grade2			20000
		
#define 	HF_Shake_ON_Range    			  0  
#define 	HF_Shake_ON_Trigger_Method  	  0 		
#define 	HF_Shake_Target_Value			  0 // 
#define 	HF_Shake_FJTIME_ON			      1//
#define 	HF_Shake_FJTIME_OFF			      0//
#define 	HF_Shake_ON						1

//#define		HF_MODE  1 


void 	HF_Pwm_Freq_update();
void 	HF_Init();

extern	volatile	bit			HF_Pwm_Freq_update_flag,OVP8_ZERO;;
extern volatile unsigned int   PWM_F, PWM_F_Back, Lim_Frequ;
extern volatile unsigned long  PWM_SF;
extern volatile unsigned char  Pwm_Freq_Add_Dec_Check;

extern volatile unsigned int  u16_PowerSet,u16_PowerSetBack0,u16_PowerSetBack1;
extern volatile unsigned int  u16_PowerSet_Target_H,u16_PowerSet_Target_L;


#endif

/******************* End of file ***************/